package com.tt.dp.factory.abs.creator;


import com.tt.dp.factory.abs.productos.CheesePizza;
import com.tt.dp.factory.abs.productos.Pizza;
import com.tt.dp.factory.abs.productos.SalchichaPizza;

public class NYPizzaStore extends PizzaStore {

    @Override
    protected Pizza createPizza(String type) {

        Pizza pizza = null;

        PizzaIngredientFactory pizzaIngredientFactory = new NYPizzaIngredientFactory();

        if("1".equals(type)){
            pizza = new CheesePizza(pizzaIngredientFactory);
        }else if("2".equals(type)){
            pizza = new SalchichaPizza(pizzaIngredientFactory);
        }

        return pizza;
    }
}
